package com.woniuxy.microfixeddepositserver.util;

/**
 * @author: masterhai
 * @date: 2021/4/16:16:41
 * @description: 日期转换
 */

public class DateUtil {
    public static String conversionDay (Integer days) {
        if (days % 365 == 0) {
            return days / 365 + "年";
        } else if (days % 30 == 0) {
            return days / 30 + "月";
        } else if (days % 7 == 0) {
            return days / 7 + "周";
        } else {
            return days + "天";
        }

    }
}
